package Fyysika_Ylesanded;

public class yl7 {
        double sagedus = (int)(Math.random()*300);
        double v2;
	public String tekst(){
		return"<html>Helilaine kiirus oleneb temperatuurist ja 20 C juures on see 344 m/s. Milline on"+
    " lainepikkus, kui sagedus on "+sagedus+" Hz?</html>";
	}
	
	public String[] vastusevariandid(){
 		double vastus = (1/sagedus)*344;
 		double v1 = Math.rint((Math.random()*5)*10.0d )/10.0d;
 		v2 = Math.rint(vastus*10.0d)/10.0d;
 		double v3 = Math.rint((Math.random()*10)*10.0d )/10.0d;
 		double v4 = Math.rint((Math.random()*1)*10.0d )/10.0d;
 		String [] vastused ={v1+" m",v2+" m",v3+" m",v4+" m"};
 		
 		return vastused;
	}
	public String[] oiged(){
		String oigedv[]={v2+" m"};
		return oigedv ;
	}
	
	public String vihje(){
		return" \u03BB = u*T";
	}
	
	public String joonisepath(){
		return "hh";
	}
	
}
